#ifndef __CINETIC__APLICATION_H__
#define __CINETIC__APLICATION_H__
#pragma once

#include "resource.h"
#include "Renderer.h"
#include "Scene.h"

namespace Cinetic
{
	View&				application_view();
	ControllerManager&	application_controller_manager();

	class Application  : public ControllerManager
	{
	public:
		Application();

	public:
		int							run();
		virtual void				on_init();

	private:
		ATOM						register_window_class();
		bool						create_window();
		void						init_subsystems();
		static LRESULT CALLBACK		StaticWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
		LRESULT						WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);

	protected:
		std::unique_ptr<Renderer>	m_renderer;
		std::unique_ptr<Scene>		m_scene;

    private:
		HWND						m_hWnd;
		bool						m_finished;
	};

	class SteerApplication : public Application
	{
	public:
		virtual void				on_init();
	};
}

#endif